package logic.xmlLoader
{
	import common.core.Txt;
	import common.manager.Resource;
	
	public class TextXML
	{
		private var m_data : Object;
		
		public function TextXML()
		{
			
		}
		
		public function prase() : void
		{
			m_data = [];
			
			var totalXML : XML = Resource.getXML("Text");
			
			for each(var item : XML in totalXML.elements())
			{
				var itemInfo : Object = new Object;
				
				itemInfo["id"] = item.@id.toString();
				itemInfo["text"] = item.@text.toString();
				
				m_data[itemInfo["id"]] = itemInfo;
			}
			
			Txt.setData(m_data);
		}
		
		public function get data() : Object
		{
			return m_data;
		}
	}
}